#define _CRT_SECURE_NO_WARNINGS 1
#include"dsoj.h"
int main()
{
    struct ListNode* n1 = (struct ListNode*)malloc(sizeof(struct ListNode));
    struct ListNode* n2 = (struct ListNode*)malloc(sizeof(struct ListNode));
    struct ListNode* n3 = (struct ListNode*)malloc(sizeof(struct ListNode));
    struct ListNode* n4 = (struct ListNode*)malloc(sizeof(struct ListNode));
    struct ListNode* n5 = (struct ListNode*)malloc(sizeof(struct ListNode));
    //struct ListNode* m2 = (struct ListNode*)malloc(sizeof(struct ListNode));
    //struct ListNode* m3 = (struct ListNode*)malloc(sizeof(struct ListNode));
    //struct ListNode* m4 = (struct ListNode*)malloc(sizeof(struct ListNode));
    n1->val = 7;
    n2->val = 13;
    n3->val = 11;
    n4->val = 10;
    n5->val = 1;
    n1->next = n2;
    n2->next = n3;
    n3->next = n4;
    n4->next = n5;
    n5->next = NULL;
    n1->random = NULL;
    n2->random =n1;
    n3->random =n5 ;
    n4->random = n3;
    n5->random = n1;
    //m1->val = 2;
    //m2->val = 3;
    //m3->val = 7;
    //m4->val = 9;
    //m1->next = m2;
    //m2->next = m3;
    //m3->next = m4;
    //m4->next = NULL;
    //CLPrint(mergeTwoLists(n1, m1));
    //if (hasCycle(n1) == 0)
    //    printf("521");
    //else
    //    printf("748");
    CLPrint(n1);
    puts("");
    CLPrint(copyRandomList(n1));
    return 0;
}